package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.MainPostBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface IMainPostMapper extends BaseMapper<MainPostBean> {
    public IPage<MainPostBean> cutByItem(@Param("id") Integer id, Page pg, @Param("title") String title,
                                     @Param("author") String author, @Param("startDate") LocalDate startDate,
                                     @Param("endDate") LocalDate endDate);

    public MainPostBean findById(Integer postId);
}
